/**
 * Created by lenovo on 19/6/17 017.
 */



/*搜索框*/
var body = document.querySelector( "body");
var head = document.querySelector(".head-search-close");


var asd = document.querySelector("#abc");
var wen = document.querySelector("#dh");
head.addEventListener("click",function(){
    wen.style.display = "none"
});
asd.addEventListener('click',function(){
    wen.style.display = "block";
});

/*

wan.addEventListener("click",function(){
    console.log(1)
    wen.style.display = "block";
});
*/


var bei = document.querySelector(".header-bei");
var box = document.querySelector("#box");
var bt_1 = document.querySelector(".header .q1");
var bt_3 = document.querySelector(".header-bei .q1");
var bt_2 = document.querySelector(".sw-1");
bt_1.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_2.style.display = "block";
});
bt_1.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_2.style.display = "none";
});
bt_3.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_2.style.display = "block";
});
bt_3.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_2.style.display = "none";
});
bt_2.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_2.style.display = "block";
});
bt_2.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_2.style.display = "none";
});


//
var bt_4 = document.querySelector(".header .q2");
var bt_5 = document.querySelector(".header-bei .q2");
var bt_6 = document.querySelector(".sw-2");
bt_4.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_6.style.display = "block";
});
bt_4.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_6.style.display = "none";
});
bt_5.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_6.style.display = "block";
});
bt_5.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_6.style.display = "none";
});
bt_6.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_6.style.display = "block";
});
bt_6.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_6.style.display = "none";
});
//
var bt_7 = document.querySelector(".header .q3");
var bt_8 = document.querySelector(".header-bei .q3");
var bt_9 = document.querySelector(".sw-3");
bt_7.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_9.style.display = "block";
});
bt_7.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_9.style.display = "none";
});
bt_8.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_9.style.display = "block";
});
bt_8.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_9.style.display = "none";
});
bt_9.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_9.style.display = "block";
});
bt_9.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_9.style.display = "none";
});
//
var bt_10 = document.querySelector(".header .q4");
var bt_11 = document.querySelector(".header-bei .q4");
var bt_12 = document.querySelector(".sw-4");
bt_10.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_12.style.display = "block";
});
bt_10.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_12.style.display = "none";
});
bt_11.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_12.style.display = "block";
});
bt_11.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_12.style.display = "none";
});
bt_12.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_12.style.display = "block";
});
bt_12.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_12.style.display = "none";
});
//
var bt_13 = document.querySelector(".header .q5");
var bt_14 = document.querySelector(".header-bei .q5");
var bt_15 = document.querySelector(".sw-5");
bt_13.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_15.style.display = "block";
});
bt_13.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_15.style.display = "none";
});
bt_14.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_15.style.display = "block";
});
bt_14.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_15.style.display = "none";
});
bt_15.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_15.style.display = "block";
});
bt_15.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_15.style.display = "none";
});
//
var bt_16 = document.querySelector(".header .q6");
var bt_17 = document.querySelector(".header-bei .q6");
var bt_18 = document.querySelector(".sw-6");
bt_16.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_18.style.display = "block";
});
bt_16.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_18.style.display = "none";
});
bt_17.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_18.style.display = "block";
});
bt_17.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_18.style.display = "none";
});
bt_18.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_18.style.display = "block";
});
bt_18.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_18.style.display = "none";
});
//
var bt_19 = document.querySelector(".header .q7");
var bt_20 = document.querySelector(".header-bei .q7");
var bt_21 = document.querySelector(".sw-7");
bt_19.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_21.style.display = "block";
});
bt_19.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_21.style.display = "none";
});
bt_20.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_21.style.display = "block";
});
bt_20.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_21.style.display = "none";
});
bt_21.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_21.style.display = "block";
});
bt_21.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_21.style.display = "none";
});
//
var bt_22 = document.querySelector(".header .q8");
var bt_23 = document.querySelector(".header-bei .q8");
var bt_24 = document.querySelector(".sw-8");
bt_22.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_24.style.display = "block";
});
bt_22.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_24.style.display = "none";
});
bt_23.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_24.style.display = "block";
});
bt_23.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_24.style.display = "none";
});
bt_24.addEventListener("mouseover", function () {
    box.style.display="block";
    bt_24.style.display = "block";
});
bt_24.addEventListener("mouseleave", function () {
    box.style.display="none";
    bt_24.style.display = "none";
});




/*底部友情链接划过效果*/
var stit = document.querySelector(".stit");
var sub_box = document.querySelector(".sub-box");
stit.addEventListener("mouseover", function () {
    sub_box.style.height = "133px";
});
stit.addEventListener("mouseleave", function () {
    sub_box.style.height = "0";
});
sub_box.addEventListener("mouseover", function () {
    sub_box.style.height = "133px";
});
sub_box.addEventListener("mouseleave", function () {
    sub_box.style.height = "0";
});